package com.nineclock.doc.controller;

import com.nineclock.common.entity.PageResult;
import com.nineclock.common.entity.Result;
import com.nineclock.doc.dto.DocumentDto;
import com.nineclock.doc.service.DocPagesListFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@RequestMapping("/document")
public class DocPagesListFileController   {
    @Autowired
    DocPagesListFileService docPagesListFileService;
    @GetMapping("/pagingFile")

    public Result<PageResult<DocumentDto>> DocPagesListFile(
            @RequestParam(value = "page", defaultValue = "1") Integer page,
            @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
            String keyword) {
        PageResult<DocumentDto> documentDtoPageResult = docPagesListFileService.DocPagesListFile(page, pageSize, keyword);

        return Result.success(documentDtoPageResult);
    }
}
